package cc.rengu.redp.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 个人消息表
 *
 * @author System
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("T_USER_MESSAGE")
public class UserMessage implements Serializable {

    private static final long serialVersionUID = 1L;
    public static final String SOURCE_TYPE_SYSTEM = "1";
    public static final String SOURCE_TYPE_USER = "2";

    @TableId(value = "ID")
    private Long id;

    /**
     * 消息所属用户ID
     */
    @TableField("USER_ID")
    private Long userId;

    /**
     * 消息内容
     */
    @TableField("MESSAGE")
    private String message;

    /**
     * 已读标志
     */
    @TableField("READ_FLG")
    private Boolean readFlg;

    /**
     * 来源类型 1-系统，2-个人用户
     */
    @TableField("SOURCE_TYPE")
    private String sourceType;

    /**
     * 来源描述；来源=1-系统，填写模块名称；来源=2-个人用户，填写用户ID
     */
    @TableField("SOURCE_DESC")
    private String sourceDesc;

    /**
     * 创建时间
     */
    @TableField("CREATE_TIME")
    private String createTime;
}
